Deactivate License Authorization Definitions

SoftwareShield System Feature Guide > Authorization Definitions > Authorization Definition Types > Deactivate License Authorization Definitions

## Deactivate License Authorization Definitions

A Deactivate License Authorization Definition deactivates a license.

A Deactivate License Authorization Definition is special in that it can not be "activated" like all other Authorization Definitions using functions like InputActivationCode, RequestActivation or SetAuthorizationDetails.

Another special feature of this type of Authorization Definition, is that you never generate Activation Codes for it. Deactivate License Authorization Definitions are defined when you have a license which is machine locked and you need to verify that a license has been "deactivated" on a specific machine.

Note that deactivation in this manner completely deactivates the entire license. This is different from "Checking-In" a Serial Number which may deactivate an aspect of your license - thus allowing you to move it to a new machine. See: Activation Check-In.

The only way to use this definition to totally render the license deactivated on a specific machine is to get a Deactivation Confirmation Code from the ClientProtector at run-time using the function RequestDeactivation.

Another special feature of this type of Authorization Definition, is that it is the only Authorization Definition which allows for a Pre-Condition. A Pre-Condition will prevent the Deactivation Confirmation Code from being generated unless a specific other Authorization Definition has already been activated. This allows you to be sure that the machine for which the license was deactivated had already been "activated".

For example: You use Copy-Protection on your license. A customer pays you and you give them an Activation Code to release the copy-protection. A few months later, they call in for a refund. You decide to give them the refund, but want to be sure they have deactivated their copy first - so you ask them to go to your programs "deactivate license dialog" that you have programmed. There, a button you have programmed calls the "RequestDeactivation" function on the ClientProtector. The ClientProtector will (among other things) fire an event back to your program OnAttemptDeactivate. You can use this to give the user a last warning. If they agree, the ClientProtector will check that the pre-condition is met. You have set the pre-condition to be the Authorization ID for Release Copy Protection. As long as it was released on this machine - a Deactivation Confirmation Code will be given back to the user through your program. They communicate this to you and you enter it into the Manual-Activator confirming that indeed - their machine for which they were already activated was deactivated. You give them the refund confident that they no longer have a working copy of your program.

NOTE: Once the Deactivation Confirmation Code is generated, the license is deactivated. The only way to reverse the deactivated state of a license is to activate a Reactivate License Authorization Definition.

You can enter a Deactivation Confirmation Code in the Authorization Request Code box in the Manual-Activator to confirm that indeed the license has been deactivated.

Deactivation Confirmation Codes contain a random element (32 bits worth) and the users machine (embed length, 26 bits worth) FingerPrint. This allows you to deactivate a clients license more than once and produce unique Deactivation Confirmation Codes each time. Naturally, you would have had to have issued Reactivation Codes in between deactivations. This way, if your licensing model potentially requires repeated "activations and deactivations", you can keep a database of Deactivation Confirmation Codes issued from a specific machine to be sure that they have indeed deactivated their license.

Shelf-Lives, Single-Use flags and parameters are not applicable since this is a special Authorization Definition.

A Deactivate License Authorization Definitions cannot be used as a payload for either type of Composite Authorization Definition.

### When To Use A Deactivate License Authorization Definition

Create a Deactivate License Authorization Definition if you have a machine locked license which you may need to deactivate.

### More Information

For help in actually creating a Deactivate License Authorization Definition, please see Authorization Definition Dialog in the SoftwareShield License Manager Reference.

For help in responding to the ClientProtector event OnAttemptDeactivate, see Creating a ClientProtector COM Event Sink.